<?php 

include '../function.php';

$dsn = "mysql:host=localhost;dbname=school";
$username="root";
$password = "";

try{
	$pdo = new Pdo($dsn,$username,$password);
}catch(PDOException $e) {
	die($e->getMessage()); 
}

$pdo->query("SET NAMES 'utf8'");

$sql = "select * from stu";


$result = $pdo->query($sql);

var_dump($result->fetchAll(PDO::FETCH_OBJ));




















 ?>